<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BDate</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div class="class" name="BDate">
			<h1>BDate</h1>
			<p>继承自<a href="BThing.html">BThing</a></p>
			<p id="resume">BDate是日期类，用于表示一个日期的年月日。<a href="#desc">详细</a></p>
			<h2>public</h2>
			<table id="public">
				<tr><td align="right">inline </td><td><a href="#BDate(int)">BDate</a>(int days = 0);</td></tr>
				<tr><td align="right">inline </td><td><a href="#BDate(int, int, int)">BDate</a>(int years, int months, int days);</td></tr>
				<tr><td align="right">inline </td><td><a href="#BDate(const BString&,char)">BDate</a>(const BString& str, char split = '-');</td></tr>
				<tr><td align="right">inline </td><td><a href="#BDate(const BDate&)">BDate</a>(const BDate& other);</td></tr>
				<tr><td align="right">inline void </td><td><a href="#reset()">reset</a>();</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#valid() const">valid</a>() const;</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#empty() const">empty</a>() const;</td></tr>
				<tr><td align="right">inline void </td><td><a href="#set(int, int, int)">set</a>(int years, int months, int days);</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#fromString(const BString&,char)">fromString</a>(const BString& str, char split = '-');</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#toString(BString&,const char*) const">toString</a>(BString& str, const char* format = "yyyy-mm-dd") const;</td></tr>
				<tr><td align="right">inline BString </td><td><a href="#toString(const char*) const">toString</a>(const char* format = "yyyy-mm-dd") const;</td></tr>
				<tr><td align="right">inline int </td><td><a href="#year() const">year</a>() const;</td></tr>
				<tr><td align="right">inline int </td><td><a href="#month() const">month</a>() const;</td></tr>
				<tr><td align="right">inline int </td><td><a href="#day() const">day</a>() const;</td></tr>
				<tr><td align="right">inline int </td><td><a href="#value() const">value</a>()const;</td></tr>
				<tr><td align="right">inline const BDate&amp; </td><td><a href="#operator = (const BDate&)">operator = </a>(const BDate& other);</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#operator == (const BDate&) const">operator == </a>(const BDate& other) const;</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#operator != (const BDate&) const">operator != </a>(const BDate& other) const;</td></tr>
				<tr><td align="right">inline void </td><td><a href="#operator += (const BDate&)">operator += </a>(const BDate& other);</td></tr>
				<tr><td align="right">inline const BDate&amp; </td><td><a href="#operator + (const BDate&) const">operator + </a>(const BDate& other) const;</td></tr>
				<tr><td align="right">inline void </td><td><a href="#operator += (int)">operator += </a>(int days);</td></tr>
				<tr><td align="right">inline const BDate </td><td><a href="#operator + (int) const">operator + </a>(int days) const;</td></tr>
				<tr><td align="right">inline void </td><td><a href="#operator -= (int)">operator -= </a>(int days);</td></tr>
				<tr><td align="right">inline const BDate </td><td><a href="#operator - (int) const">operator - </a>(int days) const;</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#operator > (const BDate&) const">operator &gt; </a>(const BDate& other) const;</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#operator >= (const BDate&) const">operator &gt;= </a>(const BDate& other) const;</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#operator < (const BDate&) const">operator &lt; </a>(const BDate& other) const;</td></tr>
				<tr><td align="right">inline bool </td><td><a href="#operator <= (const BDate&) const">operator &lt;= </a>(const BDate& other) const;</td></tr>
			</table>
			<h2>protected</h2>
			<table id="protected">
				<tr><td align="right">inline void </td><td><a href="#correct()">correct</a>();</td></tr>
			</table>
			<div id="desc">
				<h2>详细介绍：</h2>
				<p>BDate是日期类，用于表示一个日期的年月日。</p>
			</div>
			<h2 id="docs">成员文档：</h2>
			<div id="BDate(int)">
				<h3>inline BDate(int days = 0);</h3>
				<p>构造一个日期，days指定其初始的天数。</p>
			</div>
			<div id="BDate(int, int, int)">
				<h3>inline BDate(int years, int months, int days);</h3>
				<p>构造一个日期，years指定年数，months指定月数，days指定天数。</p>
			</div>
			<div id="BDate(const BString&,char)">
				<h3>inline BDate(const BString&amp; str, char split = '-');</h3>
				<p>构造一个日期，通过给定的字符串分解年月日，split指定分割的字符。</p>
			</div>
			<div id="BDate(const BDate&)">
				<h3>inline BDate(const BDate&amp; other);</h3>
				<p>构造一个日期，复制另一个日期的数据。</p>
			</div>
			<div id="reset()">
				<h3>inline void reset();</h3>
				<p>重置年月日的值为0。</p>
			</div>
			<div id="valid() const">
				<h3>inline bool valid() const;</h3>
				<p>判断日期数值是否为非空。</p>
			</div>
			<div id="empty() const">
				<h3>inline bool empty() const;</h3>
				<p>判断日期数值是否为空。</p>
			</div>
			<div id="set(int, int, int)">
				<h3>inline void set(int years, int months, int days);</h3>
				<p>设置年月日三个值。</p>
			</div>
			<div id="fromString(const BString&,char)">
				<h3>inline bool fromString(const BString&amp; str, char split = '-');</h3>
				<p>从文本中提取年月日数值，split指定分割字符。</p>
			</div>
			<div id="toString(BString&,const char*) const">
				<h3>inline bool toString(BString&amp; str, const char* format = "yyyy-mm-dd") const;</h3>
				<p>将日期值转换为字符串，str用于存放结果字符串，format指定其格式。</p>
			</div>
			<div id="toString(const char*) const">
				<h3>inline BString toString(const char* format = "yyyy-mm-dd") const;</h3>
				<p>将日期值转换为字符串，str用于存放结果字符串，format指定其格式。此方法需要生成临时字符串，效率较低。</p>
			</div>
			<div id="year() const">
				<h3>inline int year() const;</h3>
				<p>获得年数值。</p>
			</div>
			<div id="month() const">
				<h3>inline int month() const;</h3>
				<p>获得月数值。</p>
			</div>
			<div id="day() const">
				<h3>inline int day() const;</h3>
				<p>获得日数值。</p>
			</div>
			<div id="value() const">
				<h3>inline int value()const;</h3>
				<p>获得年月日的总数值。</p>
			</div>
			<div id="operator = (const BDate&)">
				<h3>inline const BDate&amp; operator = (const BDate&amp; other);</h3>
				<p>复制其它日期数值到此日期中。</p>
			</div>
			<div id="operator == (const BDate&) const">
				<h3>inline bool operator == (const BDate&amp; other) const;</h3>
				<p>判断两个日期对象是否相同。</p>
			</div>
			<div id="operator != (const BDate&) const">
				<h3>inline bool operator != (const BDate&amp; other) const;</h3>
				<p>判断两个日期对象是否不相同。</p>
			</div>
			<div id="operator += (const BDate&)">
				<h3>inline void operator += (const BDate&amp; other);</h3>
				<p>将此日期的数值加上另一个日期值。</p>
			</div>
			<div id="operator + (const BDate&) const">
				<h3>inline const BDate&amp; operator + (const BDate&amp; other) const;</h3>
				<p>将此日期数值加上另一人日期值。</p>
			</div>
			<div id="operator += (int)">
				<h3>inline void operator += (int days);</h3>
				<p>将此日期数值加上天数。</p>
			</div>
			<div id="operator + (int) const">
				<h3>inline const BDate operator + (int days) const;</h3><p>将此日期数值加上天数。</p>
			</div>
			<div id="operator -= (int)">
				<h3>inline void operator -= (int days);</h3><p>将此日期数值减去天数。</p>
			</div>
			<div id="operator - (int) const">
				<h3>inline const BDate operator - (int days) const;</h3><p>将此日期数值减去天数。</p>
			</div>
			<div id="operator > (const BDate&) const">
				<h3>inline bool operator &gt; (const BDate&amp; other) const;</h3><p>比较此日期是否大于另一个日期。</p>
			</div>
			<div id="operator >= (const BDate&) const">
				<h3>inline bool operator &gt;= (const BDate&amp; other) const;</h3><p>比较此日期是否大于等于另一个日期。</p>
			</div>
			<div id="operator < (const BDate&) const">
				<h3>inline bool operator &lt; (const BDate&amp; other) const;</h3><p>比较此日期是否小于另一个日期。</p>
			</div>
			<div id="operator <= (const BDate&) const">
				<h3>inline bool operator &lt;= (const BDate&amp; other) const;</h3><p>比较此日期是否小于等于另一个日期。</p>
			</div>
			<div id="correct()">
				<h3>inline void correct();</h3><p>校正年月日的范围，并统计总天数。</p>
			</div>
		</div>
	</body>
</html>